<?php

class DatabaseSeeder extends Seeder {

	/**
	 * Run the database seeds.
	 *
	 * @return void
	 */
	public function run()
	{
		Eloquent::unguard();

		$this->call('UserTableSeeder');
	}

}
class UserTableSeeder extends Seeder{
	public function run()
	{
		DB::table('users')->insert(array(
			[
				'username' 	=> 'admin',
				'password' 	=> md5('admin'),
				'email'		=> 'admin@el.com',
				'nicename'	=> '管理员',
				'avatar'	=> '/style/admin/avatar.png',
				'status'	=> 0,
				'description'=>'最高权限的管理员',
				'last_login'=> time(),
				'created_at'=>time(),
				'updated_at'=>time(),

			],[
				'username' 	=> 'yuesong',
				'password' 	=> md5('yuesong'),
				'email'		=> 'yuesong@el.com',
				'nicename'	=> '管理员',
				'avatar'	=> '/style/admin/avatar.png',
				'status'	=> 0,
				'description'=>'最高权限的管理员',
				'last_login'=> time(),
				'created_at'=>time(),
				'updated_at'=>time(),

			],[
				'username' 	=> 'demo',
				'password' 	=> md5('demo'),
				'email'		=> 'demo@el.com',
				'nicename'	=> '管理员',
				'avatar'	=> '/style/admin/avatar.png',
				'status'	=> 0,
				'description'=>'最高权限的管理员',
				'last_login'=> time(),
				'created_at'=>time(),
				'updated_at'=>time(),

			]
			));
	}
}
class PostTableSeeder extends Seeder{
	public function run()
	{
		DB::table('posts')->insert(array(
			[
				'title' 	=> 'nihao1111111111111111 1111',
				'thumbnail'	=> '/style/admin/avatar.png',
				'content'	=>'最高权限的管理员',
				'status'	=>0,
				'cate_id'	=>1,
				'created_at'=>time(),
				'updated_at'=>time(),

			],[
				'title' 	=> 'nihao222222 2222222222 222',
				'thumbnail'	=> '/style/admin/avatar.png',
				'content'	=>'最高权限的管理员',
				'status'	=>0,
				'cate_id'	=>1,
				'created_at'=>time(),
				'updated_at'=>time(),

			],[
				'title' 	=> 'nihao3333333 333333333 333333 333333 3',
				'thumbnail'	=> '/style/admin/avatar.png',
				'content'	=>'最高权限的管理员',
				'status'	=>0,
				'cate_id'	=>1,
				'created_at'=>time(),
				'updated_at'=>time(),

			]
			));
	}
}
class CateTableSeeder extends Seeder{
	public function run()
	{
		DB::table('category')->insert(array(
			[
				'category_slug'	=>	'skill',
				'category_name'	=>  '技术',
			],[
				'category_slug'	=>	'life',
				'category_name'	=>  '生活',

			],[
				'category_slug'	=>	'wordpress',
				'category_name'	=>  'wordpress',

			]
			));
	}
}
